import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';

import { SafeAreaView } from 'react-navigation';
import Items from '../components/items';
import BaseStyle from '../constants/Style';

export default class Base extends Component {
  // static propTypes = {

  // };

  // static defaultProps = {

  // };
  constructor(props) {
    super(props);
  }

  componentDidMount = () => {};

  componentWillUnMount = () => {};

  render() {
    const {
      navigation: { navigate },
    } = this.props;
    return (
      <SafeAreaView
        style={[BaseStyle.flex, styles.homebg]}
        forceInset={{ top: 'never' }}>
        <View style={styles.container}>
          {/* list */}
          <Items
            LeftText={'公共Icon库'}
            RightIcon={'\ue615'}
            onPress={() => {
              navigate('Icon');
            }}
          />
          <Items
            LeftText={'button组件'}
            RightIcon={'\ue615'}
            onPress={() => {
              navigate('ButtonScreen');
            }}
          />
          <Items
            LeftText={'input组件'}
            RightIcon={'\ue615'}
            onPress={() => {
              navigate('InputScreen');
            }}
          />
          <Items
            LeftText={'radio组件'}
            RightIcon={'\ue615'}
            onPress={() => {
              navigate('RadioScreen');
            }}
          />
          <Items
            LeftText={'switch组件'}
            RightIcon={'\ue615'}
            onPress={() => {
              navigate('SwitchScreen');
            }}
          />
          <Items
            LeftText={'textarea组件'}
            RightIcon={'\ue615'}
            onPress={() => {
              navigate('TextareaScreen');
            }}
          />
           <Items
            LeftText={'下拉刷新上拉加载组件'}
            RightIcon={'\ue615'}
            onPress={() => {
              navigate('PullAndLoadScreen');
            }}
          />
           <Items
            LeftText={'webView组件'}
            RightIcon={'\ue615'}
            onPress={() => {
              navigate('WebViewScreen');
            }}
          />
           <Items
            LeftText={'Slider组件'}
            RightIcon={'\ue615'}
            onPress={() => {
              navigate('SliderScreen');
            }}
          />
           <Items
            LeftText={'手势驱动'}
            RightIcon={'\ue615'}
            onPress={() => {
              navigate('PanResponder');
            }}
          />
        </View>
      </SafeAreaView>
    );
  }
}

const styles = StyleSheet.create({
  homebg: {
    backgroundColor: '#eee',
  },
  container: {
    ...BaseStyle.flex,
    paddingTop: 20,
  },
});
